cd busybox-1_37_0/_install
# 创建系统启动目录
mkdir -p etc dev mnt
# 创建系统虚拟文件目录和临时文件目录
mkdir -p proc sys tmp
# 创建启动时启动脚本目录
mkdir -p etc/init.d

# 添加fstab内容
content="
proc	/proc	proc	defaults	0	0
tmpfs	/tmp	tmpfs	defaults	0	0
sysfs	/sys	sysfs	defaults	0	0"
echo "$content" > etc/fstab

# 添加rcS内容
content="
echo -e \"Welcome to Linux trials!\"
/bin/mount -a

echo -e \"Remounting the root filesystem!\"
mount -o remount,rw /
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s"
echo "$content" > etc/init.d/rcS

# 添加可执行权限
chmod 755 etc/init.d/rcS

# 添加inittab内容
content="
::sysinit:/etc/init.d/rcS
::respawn:-/bin/sh
::askfirst:-/bin/sh
::ctrlaltdel:/bin/umount -a -r"
echo "$content" > etc/inittab

# 添加可执行权限
chmod 755 etc/inittab

# 创建设备节点
cd dev
sudo mknod console c 5 1
sudo mknod null c 1 3
sudo mknod tty1 c 4 1